<?php
session_start();
include 'config/db_config.php';
include 'lib/kelola_produk.php';
include 'lib/kelola_review.php';
include 'lib/kelola_gambar.php';

$kelola_produk = new kelola_produk();
$kelola_review = new kelola_review();
$kelola_gambar = new kelola_gambar();

if(!isset($_SESSION['ID_TECHNOPRENEUR'])|| !isset($_GET['id'])){
	echo 'gagal';//header('location:tampilan_home.php');
}

$id_produk = $_GET['id'];
var_dump($id_produk);
//$result = $kelola_produk->select_produk_by_technopreneur($id_techno); 
//while ($row=mysql_fetch_assoc($result)){
	  $kelola_review->delete_all_review($id_produk);
	  $kelola_gambar->delete_all_gambar($id_produk);
	  $kelola_produk->delete_produk($id_produk);
	//}
header('location:view/kelola_produk_techno.php?id='.$id_produk);
